// 其中是监考部分所需的函数
import request from '@/utils/request'

/**
 * 是否作弊  0/1
 * 阅卷情况：3种  -1/0/1
 * 参加情况：3中  -1/0/1
 *
 * @param examStudentVo 条件
 * @return 学生列表
 */

// 查看我的监考
// getMyProctor
// HttpServletRequest request, @RequestBody Exam exam, long current, long limit, int status
export const getMyProctor = (exam,current,limit,status)=>request({
    url:'/exam/exam/getMyProctor',
    method:'post',
    params:{current,limit,status},
    data:exam,
});

// 拿到某场考试的所有学生的在线情况
// getAllStudentAttendStatusOfExam
// String examId
export const getAllStudentAttendStatusOfExam = (examId)=>request({
    url:'/exam/exam/getAllStudentAttendStatusOfExam',
    method:'get',
    params:{examId},
});

// 查询参加某场考试的所有学生
// getAllStudentForExam
// @RequestBody ExamStudentVo examStudentVo
export const getAllStudentForExam = (examStudentVo)=>request({
    url:'/exam/exam/getAllStudentForExam',
    method:'post',
    data:examStudentVo,
});

// 根据学生id，查该学生的全部信息
// getById
// String id
export const getStudentById = (id)=>request({
    url:'/ucenter/student/getById',
    method:'get',
    params:{id},
});

// 查询某考试所有人脸违规的学生
// getAllFaceViolationStudents
// String examId
export const getAllFaceViolationStudents = (examId)=>request({
    url:'/examoss/face-violation/getAllFaceViolationStudents',
    method:'post',
    params:{examId},
});

// 获取某个学生的人脸违规记录
// getStudentFaceViolation
// String examId, String studentId
export const getStudentFaceViolation = (examId,studentId)=>request({
    url:'/examoss/face-violation/getStudentFaceViolation',
    method:'get',
    params:{examId,studentId},
});

// 删除一个学生的人脸违规
// deleteStudentFaceViolation
// String examId, String studentId
export const deleteStudentFaceViolation = (examId,studentId)=>request({
    url:'/examoss/face-violation/deleteStudentFaceViolation',
    method:'delete',
    params:{examId,studentId},
});

// 删除一个或者多个    人脸违规记录
// deleteFaceViolation
// String[] faceViolationIds
export const deleteFaceViolation = (faceViolationIds)=>request({
    url:'/examoss/face-violation/deleteFaceViolation',
    method:'post',
    params:{faceViolationIds},
});

// 查询某场考试的所有学生上下线记录
// getAllStudentOnlineStatusOfExam
// String examId
export const getAllStudentOnlineStatusOfExam = (examId)=>request({
    url:'/webSocket/exam-student-online/getAllStudentOnlineStatusOfExam',
    method:'get',
    params:{examId},
});